/* Media Section */
.media-section {
    background-color: #f8f9fa;
    padding: var(--section-padding);
    position: relative;
    overflow: hidden;
}

.media-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image: radial-gradient(#e1e1e1 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.4;
    pointer-events: none;
}

.media-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.media-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    border-radius: 12px;
    position: relative;
    transition: transform 0.3s ease;
}

.media-card-link:hover {
    transform: translateY(-5px);
}

.media-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.media-card-link:hover .media-card {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.media-image {
    width: 100%;
    height: 180px;
    position: relative;
    overflow: hidden;
}

.media-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.media-card-link:hover .media-thumbnail {
    transform: scale(1.05);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.media-card-link:hover .play-button {
    background: rgba(var(--accent-rgb), 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.media-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.media-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.media-card p {
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1;
}

.media-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
    padding: 5px 0;
    position: relative;
    transition: all 0.3s ease;
}

.media-link svg {
    transition: transform 0.3s ease;
}

.media-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.media-link:hover {
    color: var(--primary-color);
}

.media-link:hover::after {
    width: 100%;
}

.media-link:hover svg,
.media-card-link:hover .media-link svg {
    transform: translateX(3px);
}

/* Accessibility & focus states */
.media-card-link:focus {
    outline: none;
    transform: translateY(-5px);
}

.media-card-link:focus .media-card {
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.5), 0 15px 35px rgba(0, 0, 0, 0.1);
}

.media-card-link:focus .media-link svg {
    transform: translateX(3px);
}

.project-stats {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.stats-header {
    margin-bottom: 20px;
}

.stats-header h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.stats-header p {
    color: #666;
}

.stats-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.stats-badges img {
    height: 25px;
}

/* Media queries */
@media (max-width: 992px) {
    .media-cards {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .media-cards {
        grid-template-columns: 1fr;
    }
    
    .media-image {
        height: 200px;
    }
    
    .stats-badges {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .media-image {
        height: 180px;
    }
    
    .media-content {
        padding: 20px;
    }
    
    .media-card h3 {
        font-size: 1.3rem;
    }
}

/* Animation */
.media-card-link {
    animation: fadeInUp 0.6s ease backwards;
}

.media-card-link:nth-child(1) {
    animation-delay: 0.1s;
}

.media-card-link:nth-child(2) {
    animation-delay: 0.2s;
}

.media-card-link:nth-child(3) {
    animation-delay: 0.3s;
}

.project-stats {
    animation: fadeInUp 0.6s ease 0.4s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
